<!doctype html>
<html xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>联系我们 - {$config.system_name}</title>
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="{$config.index_keywords}"/>
<meta name="description" content="{$config.index_description}"/>
{include file="common:column" /}
<style>

</style>
</head>
<body>
<div class="trm-mode-swich-animation-frame">
    <div class="trm-mode-swich-animation">
        <i class="layui-icon layui-icon-light-b"></i>
        <div class="trm-horizon"></div>
        <i class="layui-icon layui-icon-b-fill"></i>
    </div>
</div>
<!-- site wrapper -->
<div class="site-wrapper" id="trm-scroll-container">
  <div class="main-overlay"></div>
  <header class="header-default">
  {include file="common:header" /}
  </header>
  <section class="page-header">
    <div class="container-xl">
      <div class="text-center">
        <h1 class="mt-0 mb-2">评论 & 留言</h1>
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb justify-content-center mb-0">
            <li class="breadcrumb-item"><a href="{$config.microblog}">首页</a></li>
            <li class="breadcrumb-item active" aria-current="page">留言板</li>
          </ol>
        </nav>
      </div>
    </div>
</section>
<section class="main-content">
  <div class="container-xl">
	<div class="row">
      <div class="col-md-4">
        <div class="contact-item bordered rounded d-flex align-items-center">
          <span class="icon icon-phone"></span>
          <div class="details">
            <h3 class="mb-0 mt-0">站长博客</h3>
            <p class="mb-0">{$config.microblog}</p>
          </div>
        </div>
        <div class="spacer d-md-none d-lg-none" data-height="30"></div>
      </div>
      <div class="col-md-4">
        <div class="contact-item bordered rounded d-flex align-items-center">
          <span class="icon icon-envelope-open"></span>
          <div class="details">
            <h3 class="mb-0 mt-0">站长邮箱</h3>
            <p class="mb-0">{$config.email}</p>
          </div>
        </div>
        <div class="spacer d-md-none d-lg-none" data-height="30"></div>
      </div>
      <div class="col-md-4">
        <div class="contact-item bordered rounded d-flex align-items-center">
          <span class="icon icon-map"></span>
          <div class="details">
            <h3 class="mb-0 mt-0">站长QQ</h3>
            <p class="mb-0"><a href="http://wpa.qq.com/msgrd?v=3&uin={$config.qq}&site=qq&menu=yes">{$config.qq}</a></p>
          </div>
        </div>
      </div>
    </div>
    <div class="spacer" data-height="50"></div>
    <div class="section-header">
      <h3 class="section-title">填写留言吧！</h3>
      <img src="{$config.default_url}/assets/images/wave.svg" class="wave" alt="wave" />
      <h5>为了能及时反馈您的问题，请您留下真实的邮箱地址或QQ号以便我们能第一时间联系您！</h5>
      <h6>申请友情链接请详细填写网址和评论内容，以便用作介绍！</h6>
      <h6><font color=#ff0000>本站已启用违法违规关键词屏蔽，评论不易，且行且珍惜！</font></h6>
    </div>
  </div>
</section>
<section class="main-content">
  <div id="content">
    <div id="content-place">
      <div class="content-post" id="content-post">
        <div class="container-xl">
          <form id="contactForm" class="contact-form" method="post">
            <input type="hidden" name="pid" value="0">
            <div class="messages"></div>
{include file="common:message" /}
            <button type="submit" onclick="editsong();return false;" value="Submit" class="btn btn-default">提交留言</button>
          </form>
          <div style="margin-bottom:20px;"></div>
        </div>
      </div>
	</div>
  </div>
</section>
<section class="main-content">
  <div class="container-xl">
	<div class="row gy-4">
	  <div class="col-lg-12">
		<div class="spacer" data-height="50"></div>
		<div class="section-header">
		  <h3 class="section-title">留言列表</h3>
		  <img src="{$config.default_url}/assets/images/wave.svg" class="wave" alt="wave" />
		  <h6>网络信息过于复杂，请勿相信任何非认证用户的评论或者留言，请认准认证(<span class="renz-V" lay-tips="站长"></span>)图标</h6>
		</div>
		<div class="comments bordered padding-30 rounded">
		  <ul class="comments">
		  {volist name="commlist" id="vo"}<li class="comment rounded reply-cn" id="content-{$vo.id}">
		    <div class="thumb">
			  <img src="{$vo.avatar}" class="messanava" alt="{$vo.nickname}" />{eq name="$vo['user_id']" value="1"}<span class="thumb-V" lay-tips="站长"></span>{else/}{/eq}</div>
			  <div class="details" id="{$vo.id}">
				<div class="reply">
				  <a href="#content-{$vo.id}" onclick="contentReply({$vo.id},this)">回复留言</a>
				</div>
				<h4 class="name"><a>{$vo.nickname}</a></h4>
				<span class="date"><i class="layui-icon layui-icon-time-o"></i> {$vo.create_time|date="M-d-Y H:i A"} <i class="layui-icon layui-icon-location"></i> {$vo.ipmess}</span>
				<p><?php echo preg_replace("/\[F(([0-9]?[0-9])|99)\]/",'<img src="'.($config['microblog']).'/static/image/emoji/f$1.png" class="faces" alt="faces" style="height: 2em; max-height: 2em;"/>',comcontent($vo['content'])); ?></p>
				<div class="sign-ob"><?php echo preg_replace("/\[faimg=?\]*(.*?)(\[\/faimg)?\]/",'<img class="comment-img" src="$1"/>',comcontent($vo['useragent'])); ?></div>
			  </div>
			</li>
            {if condition="$vo['children'] neq ''"}{volist name="vo.children" id="vo2"}<li class="comment child rounded">
			  <div class="thumb"><img src="{$vo2.avatar}" class="messanava" alt="{$vo2.nickname}" />{eq name="$vo2['user_id']" value="1"}<span class="thumb-V" lay-tips="站长"></span>{else/}{/eq}</div>
			  <div class="details" id="{$vo2.id}">
                <h4 class="name">
                  <a>{$vo2.nickname}<span style="color: #ff0000;" class="ue_t"> @ </span>{$vo.nickname}</a>
				</h4>
                <span class="date"><i class="layui-icon layui-icon-time-o"></i> {$vo2.create_time|date="M-d-Y H:i A"} <i class="layui-icon layui-icon-location"></i> {$vo2.ipmess}</span>
                  <p><?php echo preg_replace("/\[F(([0-9]?[0-9])|99)\]/",'<img src="'.($config['microblog']).'/static/image/emoji/f$1.png" class="faces" alt="faces" style="height: 2em; max-height: 2em;"/>',comcontent($vo2['content'])); ?></p>
				<div class="sign-ob"><?php echo preg_replace("/\[faimg=?\]*(.*?)(\[\/faimg)?\]/",'<img class="comment-img" src="$1"/>',comcontent($vo2['useragent'])); ?></div>
              </div>
			</li>{/volist}{/if}{/volist}
			
          </ul>
        </div>
        <nav>
          <ul class="pagination justify-content-center">
            {$page|raw}
            
          </ul>
        </nav>
      </div>
    </div>
  </div>
</section>
{include file="common:footer" /}
{include file="common:columnjs" /}
    <script>
    function ajaxPost(){
        var formData = $("#contactForm").serialize();
        $.ajax({
            type:"post",
            url:"{:url('/index/messages/add')}",  //数据传输的控制器方法
            data:formData,//这里data传递过去的是序列化以后的字符串
            success:function(data){
                if (data.code === 0) {
                    layer.msg(data.msg, {offset:'50%',icon: 1});
                    setTimeout(function () {
                            window.parent.location.reload()
                        },
                        1000);
                } else {
                    layer.msg(data.msg, {offset:'50%',icon: 5});
                }
            }
        });
        return false;
    };
  </script>
</body>
</html>